import { Controller, Get, Inject } from '@nestjs/common';
import { AppService } from './app.service';
import { ListService } from './list/list.service'

@Controller({
  path: 'home',
})
export class AppController {
  constructor(
    private readonly appService: AppService,
    // zhe里用了共享模块
    private readonly listService: ListService,
    // zhe里用了动态模块
    @Inject('Dymic') private readonly dymic: any,
  ) { }

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }

  @Get('sharedModule')
  shared(): string {
    return this.listService.findAll();
  }

  @Get('dymicModule')
  dymicFn(): string {
    return this.dymic;
  }
}
